package com.wardrobe.soa.backend.banner;

import com.wardrobe.dao.banner.BannerDao;
import com.wardrobe.domain.banner.BannerBean;
import com.wardrobe.domain.banner.BannerShowBean;
import com.wardrobe.domain.common.BackEndFromBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/11/15.
 */
@Service
public class BackBannerService {
    @Autowired
    private BannerDao bannerDao;


    public int addBanner(BannerBean bannerBean){
        return bannerDao.insertBanner(bannerBean);
    }

    public int modifyBanner(BackEndFromBean fromBean){
        return bannerDao.updateBanner(fromBean);
    }

    public int deleteBanner(int id){
        return bannerDao.deleteBanner(id);
    }

    public List<BannerShowBean> getBannerList(int status,int type){
        return bannerDao.selectBannerList(status,type);
    }
}
